{@ // 상점의 이름으로부터 상점이 설정한 최소값을 구한다.
	$nickname = $oDocument->getNickName();
	$oDB = &DB::getInstance();
	$result = $oDB->_query("SELECT value from yman_document_extra_vars where document_srl = (SELECT document_srl FROM yman_documents where nick_name = '$nickname' and module_srl = 141 limit 1) and var_idx=1 limit 1;");
	
	$output = $oDB->_fetch($result);
	
	$temp = (array)$output;

}



<script type="text/javascript">
$(function($) {
	$(function(){
		$(document).ready(function(){
			$("#pre_star").click(function(e){
				var x = (e.pageX - $(this).offset().left - 100);
				var y = x/21.6;
				y = Math.round(y);
				x = y* 21.6;
				$("#pre_star_on").css('width',x);
				$("#pre_star_point").empty();
				$("#pre_star_point").append(y+".0");
			})
		});
	});
	

	$.fn.customFadeIn = function(speed, callback) {
		$(this).fadeIn(speed, function() {
			if(jQuery.browser.msie)
				$(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
	$.fn.customFadeOut = function(speed, callback) {
		$(this).fadeOut(speed, function() {
			if(jQuery.browser.msie)
				$(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};

	
	$(document).ready(function() {
		$("#buttonPreference1123").click(function(e) {
			e.preventDefault();							
	        
			var maskHeight = $(document).height();
			var maskWidth = $(window).width();
			
			//인터넷 익스플로러에서 오류남
			//How to fix this problem : http://www.kevinleary.net/jquery-fadein-fadeout-problems-in-internet-explorer/
			$("#mask2").fadeTo("slow", 0.3);

		
			$('#mask2').css('width', maskWidth);
			$('#mask2').css('height', maskHeight);

			$("#mask2").show();
			

			var winH = $(window).height();
	        var winW = $(window).width();

	        $("#divPreference1123").css('top',  winH/2-$("#divPreference1123").height()/2);
	        $("#divPreference1123").css('left', 1000/2-$("#divPreference1123").width()/2);

			if(jQuery.browser.msie){
				$("#divPreference1123").css('filter','');
				$("#divPreference1123").show();
			}
			else{
		        $("#divPreference1123").fadeIn(1000, function(){
					//$(this).css('filter','');
				});
			}
		});
		
		$('#divPreference1123_close').click(function (e) {
			e.preventDefault();
			$("#mask2").hide();
			$('#divPreference1123').hide();
		});
		
		$('#mask2').click(function () {
			$(this).hide();
			$('#divPreference1123').hide();
		}); 
				
		$("#pre_submit").click(function(e) {
			e.preventDefault();
			var pre_result = $("#pre_star_on").width()/22;
			
			var params = new Array();
			params['document_srl'] = {$oDocument->document_srl};
			params['grade'] = pre_result;

			//exec_xml('document', 'procDocumentGradeUp', params,function() { alert("평가해주셔서 감사합니다."); location.reload(); });			
			
			//doCallModuleAction('document','procDocumentVoteUp','{$document_srl}',pre_result);
		});
		
		var star_ratio = {(float)($oDocument->getExtraValue(8)/$oDocument->get('voted_count'))};
		$("#star_on").css('width', $("#star_on").width()*star_ratio*0.1);
		
	});
});
</script>

<script type="text/javascript">
minimumPrice['{$nickname}']={$temp[value]};
var id;
var price;
var calorie;
var name;
var phone;
var nickname;
(function($){
	$(function(){		
		$( ".board_read" ).draggable({
			start: function() {
				var id3 = {$oDocument->document_srl};
				var price3 = {$oDocument->getExtraValue(1)};
				var calorie3 = "{$oDocument->getExtraValue(4)}";
				var name3 = "{$oDocument->getTitle($module_info->subject_cut_size)}";
				var phone3= "{$oDocument->getExtraValue(3)}";
				var nickname3="{$oDocument->getNickName()}";
				
				copyVar(id3, price3, calorie3, name3, phone3, nickname3);

				var temp_top = $('#divCart').css("margin-top");
				temp_top = parseInt(temp_top.substring(0, temp_top.length-2));
				$('#divCart').css("margin-top",temp_top-1);
				$('#divCart').css("margin-right","7px");
				$('#divCart').css("border","2px #cc5555 solid");
			},
			helper: function() {
				return $(this).clone();	
			},
			stop: function() {
				$('#divCart').css("border","1px solid #b8b8b8");
				$('#divCart').css("margin-right","8px");

				var temp_top = $('#divCart').css("margin-top");
				temp_top = parseInt(temp_top.substring(0, temp_top.length-2));
				$('#divCart').css("margin-top",temp_top+1);
			}
		});
		
		$(".board_read").dblclick(function() {
			var id4 = {$oDocument->document_srl};
			var price4 = {$oDocument->getExtraValue(1)};
			var calorie4 = "{$oDocument->getExtraValue(4)}";
			var name4 = "{$oDocument->getTitle($module_info->subject_cut_size)}";
			var phone4 = "{$oDocument->getExtraValue(3)}";
			var nickname4 ="{$oDocument->getNickName()}";
			toCart(id4, price4,calorie4,name4,phone4,nickname4);
		});
    });
})(jQuery);
</script>


<div class="board_read">
	<!-- READ HEADER -->
	<div class="read_header">
		<a style="font-size:24px; font-weight:bold; margin-bottom:10px;">{$oDocument->getTitle()}</a>
<!-- 조회수 삭제 2011/04/06 김누리.
		<p class="sum">
			<span class="read">{$lang->readed_count} <span class="num">{$oDocument->get('readed_count')}</span></span>
		</p>
		-->
	</div>
	
	<!-- /READ HEADER -->
	<!-- READ BODY -->
	<div class="read_body">
		<table border="0" class="read_table">
		<tr>
			<td rowspan="5" valign="top">
				<!--@foreach($oDocument->getUploadedFiles() as $key => $file)-->
					<img src="{getUrl('')}{$file->download_url}" class="read_body_img"/>
				<!--@end-->
			</td>
		<tr>
			<td class="read_table_title">점포명</td>
			<td class="read_table_value">{$oDocument->getNickName()}</td>
		</tr>
		<tr>
			<td class="read_table_title">가격</td>
			<td class="read_table_value">{$oDocument->getExtraValue(1)}원
			</td>
		</tr>
		<!--@if($oDocument->getExtraValue(11) && $oDocument->getExtraValue(12))-->
		{@
			$social_date = $oDocument->getExtraValue(11);
			$social_month = $social_date[4].$social_date[5];
			$social_day = $social_date[6].$social_date[7];
		}
		
{@
	$oDB2 = &DB::getInstance();
	$query2 = $oDB2->_query("SELECT count(*) as cnt FROM yman_document_extra_vars where module_srl=76 and var_idx=1 and value like '%".$oDocument->document_srl."%'");
	$result2 = $oDB2->_fetch($query2);
}
		<tr>
			<td class="read_table_title">소셜 상품</td>
			<td class="read_table_value" style="font-size:16px;">
				<b>{$social_month}월 {$social_day}일</b>까지 <b>{$oDocument->getExtraValue(12)}명</b>이 구매하면<br/>
				{Number_Format($oDocument->getExtraValue(10))}원이 <b>{Number_Format($oDocument->getExtraValue(1))}원</b>으로!<br/>
				<a style="float:right; padding-right:30px;"><b style="color:red;">{$result2->cnt}명</b> 구매하였습니다.</a>
			</td>
		</tr>
		<!--@end-->
		<tr>
			<td class="read_table_title">설명</td>
			<td class="read_table_value contentHeight">{$oDocument->getContent(false)}</td>
		</tr>
		<tr>
			<td class="read_table_title"></td>
			<td class="read_table_grade">
			<!-- 2011/04/06 별점 표시 제거. 김누리
			<div style="position:relative;float:left;">{round((float)($oDocument->getExtraValue(8)/$oDocument->get('voted_count')),2)}</div>
			<div style="position:relative;float:left;">
				<div id="star_on"></div>
				<div id="star_off"></div>
			</div>
			-->
			</td>
		</tr>
		</table>
	</div>
	
	<!-- /READ BODY -->
	<!-- READ FOOTER -->
	<div class="read_footer">		
		<div class="btnArea">
			<!--<span class="goList"><a href="{getUrl('document_srl','')}" class="btn">{$lang->cmd_list}</a></span>-->
			<span class="goEdit">
				<a cond="$oDocument->isEditable()" class="btn" href="{getUrl('act','dispBoardWrite','document_srl',$oDocument->document_srl,'comment_srl','')}">{$lang->cmd_modify}</a>
				<a cond="$oDocument->isEditable()" class="btn" href="{getUrl('act','dispBoardDelete','document_srl',$oDocument->document_srl,'comment_srl','')}">{$lang->cmd_delete}</a>
			</span>
		</div>
		
		<!-- 2011/04/06 평점주기 버튼 제거. 김누리
		<span cond="$logged_info"><a id="buttonPreference1123" href="#"><img src="images/button_rating.png" /></a></span>
		-->
<div style="float:left;margin-left:30px;">
	<div style="float:left;margin-right:5px;">
		<a href="http://twitter.com/share" class="twitter-share-button" data-count="none" data-lang="ko"></a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
	</div>
	<div id="fb-root" style="float:left;"></div>
	<script>(function(d){
	  var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
	  js = d.createElement('script'); js.id = id; js.async = true;
	  js.src = "//connect.facebook.net/en_US/all.js#appId=141537755897556&xfbml=1";
	  d.getElementsByTagName('head')[0].appendChild(js);
	}(document));</script>
	<div class="fb-like" data-send="true" data-width="450" data-show-faces="false" style="float:left;"></div>
</div>
		
		<a onClick="javascript:toCart({$oDocument->document_srl},{$oDocument->getExtraValue(1)},'{$oDocument->getExtraValue(4)}','{$oDocument->getTitle()}','{$oDocument->getExtraValue(3)}','{$oDocument->getNickName()}');"><img src="images/button_detail_select.png" /></a>
		
	</div>
	<!-- /READ FOOTER -->
</div>

<div id="divPreference1123" class="window" style="">
	<div id="pre_star">
		<div id="pre_star_off"></div>
		<div id="pre_star_on"></div>
	</div>
	<div id="divPreference1123_close"><img src="./images/button_close.png" /></div>
	<div id="pre_star_point">5.0</div>
	<div id="pre_submit"><img src="./images/button_confirm.png" /></div>
</div>
<div id="mask2"></div>